<template>
  <div>
      <h1 @click="onclick">父</h1>
        <children v-if="fath">父</children>
  </div>
</template>

<script>
import children from './children.vue'
export default {
  components:{
    children
  },
  data(){
    return{
      fath:false
    }
  },
  methods:{
    onclick(){
      this.fath=true
    }
  }
}
</script>

<style>

</style>